package popoer.price.thief.domain;

import java.util.ArrayList;
import java.util.List;

public class Category {

	private URLLink link = new URLLink();
	private Category parent;
	private List<Category> children = new ArrayList<Category>();;
	
	public String getName() {
		return link.getName();
	}
	public void setName(String name) {
		this.link.setName(name);
	}
	public String getLink() {
		return link.getLink();
	}
	public void setLink(String link) {
		this.link.setLink(link);
	}
	public Category getParent() {
		return parent;
	}
	public void setParent(Category parent) {
		this.parent = parent;
	}
	public List<Category> getChildren() {
		return children;
	}
	public void setChildren(List<Category> children) {
		this.children = children;
	}
	public void addChild(Category child){
		children.add(child);
	}
	@Override
	public String toString() {
		return "Category [children=" + children.size() + ", link=" + link.getLink() + ", name="
				+ link.getName() + "]";
	}
	
}
